﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Schedules.aspx.cs" Inherits="_Default" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <!--#include virtual="include/Head.ascx"-->
    <script type='text/javascript' src="Assets/js/jquery-custom-1.0.0.js?v=0611"></script>
    <script type='text/javascript' src="Assets/js/encoder.js"></script>
    <script type='text/javascript' src="Assets/js/Schedules.js?v=1612"></script>
    <link rel="stylesheet" href="Assets/css/EditTableCell.css" type="text/css" />
    <script type="text/javascript">
        function getUrlVars() {
            var vars = {};
            var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function (m, key, value) {
                vars[key] = value;
            });
            return vars;
        }
        function doDelete(strID, strName) {
            if (confirm('Bạn có thực sự muốn xóa ' + strName + '?')) {
                var vnpage = getUrlVars()['page_number'];
                var strPortTo = 0;
                var strPortFrom = 0;
                if (getUrlVars()['PortToID'])
                    strPortTo = getUrlVars()['PortToID'];
                if (getUrlVars()['PortFromID'])
                    strPortFrom = getUrlVars()['PortFromID'];
                var urlPOL = strPortTo > 0 ? "&PortToID=" + strPortTo : "";
                var urlPOD = strPortFrom > 0 ? "&PortFromID=" + strPortFrom : "";
                if (vnpage)
                    window.location.href = "Schedules.aspx?action=delete&ID=" + strID + "&page_number=" + vnpage + urlPOL + urlPOD;
                else
                    window.location.href = "Schedules.aspx?action=delete&ID=" + strID + urlPOL + urlPOD;
            }
        }

        jQuery("document").ready(function () {
            //$.getJSON('Handlers/Event.ashx?action=listRegionSchedule', function (data) {
            //    $('#txtRegionSearch').focus().autocomplete(data, { matchContains: true });
            //});
            //$('#txtCarrName').focus().autocomplete(carrs, { matchContains: true });
            //$('#txtPortTo').focus().autocomplete(ports, { matchContains: true });
            //$('#txtPortFrom').focus().autocomplete(ports, { matchContains: true });
            //$('#txtCountry').focus().autocomplete(country, { matchContains: true });
            //Select Text when focus textboxx            
            $("input[type='text']").click(function () {
                $(this).select();
            });

        });
        function OnPolSelected(source, eventArgs) {
            var hdnValueID = "<%= hidPolID.ClientID %>";
            document.getElementById(hdnValueID).value = eventArgs.get_value();
            $("#txtPol").focus();
        }
        function OnPodSelected(source, eventArgs) {

            var hdnValueID = "<%= hidPodID.ClientID %>";
            document.getElementById(hdnValueID).value = eventArgs.get_value();
            $("#txtPod").focus();
        }
        function OnCarrsSelected(source, eventArgs) {

            var hdnValueID = "<%= hidCarrID.ClientID %>";
            document.getElementById(hdnValueID).value = eventArgs.get_value();
            $("#txtCarr").focus();
        }
        function OnServiceAreaFromSelected(source, eventArgs) {

            var hdnValueID = "<%= hidServiceAreaFromSearch.ClientID %>";
            document.getElementById(hdnValueID).value = eventArgs.get_value();
        }
        function OnRegionFromSelected(source, eventArgs) {

            var hdnValueID = "<%= hidRegionFromSearch.ClientID %>";
            document.getElementById(hdnValueID).value = eventArgs.get_value();
        }
        function OnCountryFromSelected(source, eventArgs) {

            var hdnValueID = "<%= hidCountryFromSearch.ClientID %>";
            document.getElementById(hdnValueID).value = eventArgs.get_value();
        }
        function OnServiceAreaToSelected(source, eventArgs) {

            var hdnValueID = "<%= hidServiceAreaToSearch.ClientID %>";
            document.getElementById(hdnValueID).value = eventArgs.get_value();
        }
        function OnRegionToSelected(source, eventArgs) {

            var hdnValueID = "<%= hidRegionToSearch.ClientID %>";
            document.getElementById(hdnValueID).value = eventArgs.get_value();
        }
        function OnCountryToSelected(source, eventArgs) {

            var hdnValueID = "<%= hidCountryToSearch.ClientID %>";
            document.getElementById(hdnValueID).value = eventArgs.get_value();
        }
        //Add new
        function OnCarrNameSelected(source, eventArgs) {
            var hdnValueID = "<%= hidCarrName.ClientID %>";
            document.getElementById(hdnValueID).value = eventArgs.get_value();
            $("#txtCarrName").focus();
        }
        function OnPortToSelected(source, eventArgs) {
            var hdnValueID = "<%= hidPortTo.ClientID %>";
            document.getElementById(hdnValueID).value = eventArgs.get_value();
            $("#txtPortTo").focus();
        }
        function OnPortFromSelected(source, eventArgs) {

            var hdnValueID = "<%= hidPortFrom.ClientID %>";
            document.getElementById(hdnValueID).value = eventArgs.get_value();
            $("#txtPortFrom").focus();
        }
    </script>
    <style type="text/css">
        #divSearch input[type=text] {
            border-radius: 7px;
            border: none;
            line-height: 22px;
            margin: 2px;
            font-size: 12px;
            /*padding: 3px;*/
        }
    </style>
</head>
<body>
    <div id="body-wrapper">
        <div id="header">
            <!--#include virtual="include/top.ascx"-->
        </div>
        <div id="main-content1">
            <div class="content-box">
                <form id="frmSchedules" runat="server" autocomplete="off">
                    <%if (nPermissions >= 3)
                      {%>
                    <asp:Panel ID="plAddnew" runat="server" DefaultButton="btnSave">
                        <div style="display: none;" id="addnewbox">
                            <table class="adminedit" style="width: 100%;">
                                <tr>
                                    <%if (nPermissions >= 7)
                                      {%>
                                    <th align="center">Carrs
                                    </th>
                                    <th align="center">POL
                                    </th>
                                    <th align="center">POD
                                    </th>
                                    <%} %>
                                    <th align="center">SER
                                    </th>
                                    <th align="center">Mon
                                    </th>
                                    <th align="center">Tue
                                    </th>
                                    <th>Web
                                    </th>
                                    <th align="center">Thu
                                    </th>
                                    <th align="center">Fri
                                    </th>
                                    <th align="center">Sat
                                    </th>
                                    <th align="center">Sun
                                    </th>
                                    <th align="center">T/S1
                                    </th>
                                    <th align="center">T/S2
                                    </th>
                                    <%--<th align="center">CY
                                </th>
                                <th align="center">CLS
                                </th>--%>
                                    <th align="center">Remark
                                    </th>
                                    <!-- th align="center">
                                Import</th -->
                                </tr>
                                <tr>
                                    <%if (nPermissions >= 7)
                                      {%>
                                    <td>
                                        <asp:TextBox class="cls" ID="txtCarrName" runat="server" Width="100px" TabIndex="1"></asp:TextBox>
                                        <asp:HiddenField ID="hidCarrName" runat="server" />
                                        <asp:AutoCompleteExtender ID="AutoCompleteExtender8" runat="server" ServiceMethod="CarrsAutoCompleteAjaxRequest"
                                            ServicePath="Webservices/AutoComplete.asmx" MinimumPrefixLength="2" CompletionInterval="100"
                                            EnableCaching="true" CompletionSetCount="10" TargetControlID="txtCarrName" FirstRowSelected="true"
                                            CompletionListCssClass="completionList" CompletionListItemCssClass="listItem"
                                            CompletionListHighlightedItemCssClass="itemHighlighted" DelimiterCharacters=","
                                            OnClientItemSelected="OnCarrNameSelected">
                                        </asp:AutoCompleteExtender>
                                    </td>
                                    <td>
                                        <asp:TextBox class="cls" ID="txtPortTo" runat="server" Width="100px" TabIndex="2"></asp:TextBox>
                                        <asp:HiddenField ID="hidPortTo" runat="server" />
                                        <asp:AutoCompleteExtender ID="AutoCompleteExtender9" runat="server" ServiceMethod="PortAutoCompleteAjaxRequest"
                                            ServicePath="Webservices/AutoComplete.asmx" MinimumPrefixLength="2" CompletionInterval="100"
                                            EnableCaching="true" CompletionSetCount="10" TargetControlID="txtPortTo" FirstRowSelected="true"
                                            CompletionListCssClass="completionList" CompletionListItemCssClass="listItem"
                                            CompletionListHighlightedItemCssClass="itemHighlighted" DelimiterCharacters=","
                                            OnClientItemSelected="OnPortToSelected">
                                        </asp:AutoCompleteExtender>

                                    </td>
                                    <td>
                                        <asp:TextBox class="cls" ID="txtPortFrom" runat="server" Width="100px" TabIndex="3"></asp:TextBox>
                                        <asp:HiddenField ID="hidPortFrom" runat="server" />
                                        <asp:AutoCompleteExtender ID="AutoCompleteExtender10" runat="server" ServiceMethod="PortAutoCompleteAjaxRequest"
                                            ServicePath="Webservices/AutoComplete.asmx" MinimumPrefixLength="2" CompletionInterval="100"
                                            EnableCaching="false" CompletionSetCount="10" TargetControlID="txtPortFrom" FirstRowSelected="true"
                                            CompletionListCssClass="completionList" CompletionListItemCssClass="listItem"
                                            CompletionListHighlightedItemCssClass="itemHighlighted" DelimiterCharacters=","
                                            OnClientItemSelected="OnPortFromSelected">
                                        </asp:AutoCompleteExtender>
                                    </td>
                                    <%} %>
                                    <td>
                                        <asp:TextBox class="cls" ID="txtSer" runat="server" Width="50px" TabIndex="4" Style="text-align: right;"></asp:TextBox>
                                    </td>
                                    <td>
                                        <asp:TextBox class="cls" ID="txtMon" runat="server" Width="50px" TabIndex="5" Style="text-align: right;"></asp:TextBox>
                                    </td>
                                    <td>
                                        <asp:TextBox class="cls" ID="txtTue" runat="server" Width="50px" TabIndex="6" Style="text-align: right;"></asp:TextBox>
                                    </td>
                                    <td>
                                        <asp:TextBox class="cls" ID="txtWeb" runat="server" Width="50px" TabIndex="7" Style="text-align: right;"></asp:TextBox>
                                    </td>
                                    <td>
                                        <asp:TextBox class="cls" ID="txtThu" runat="server" Width="50px" TabIndex="8" Style="text-align: right;"></asp:TextBox>
                                    </td>
                                    <td>
                                        <asp:TextBox class="cls" ID="txtFri" runat="server" Width="50px" TabIndex="9" Style="text-align: right;"></asp:TextBox>
                                    </td>
                                    <td>
                                        <asp:TextBox class="cls" ID="txtSat" runat="server" Width="50px" TabIndex="10" Style="text-align: right;"></asp:TextBox>
                                    </td>
                                    <td>
                                        <asp:TextBox class="cls" ID="txtSun" runat="server" Width="50px" TabIndex="11" Style="text-align: right;"></asp:TextBox>
                                    </td>
                                    <td>
                                        <asp:TextBox class="cls" ID="txtTS1" runat="server" Width="50px" TabIndex="12" Style="text-align: right;"></asp:TextBox>
                                    </td>
                                    <td>
                                        <asp:TextBox class="cls" ID="txtTS2" runat="server" Width="50px" TabIndex="13" Style="text-align: right;"></asp:TextBox>
                                    </td>
                                    <%--<td>
                                    <asp:TextBox class="cls" ID="txtCY" runat="server" Width="50px" TabIndex="14" Style="text-align: right;"></asp:TextBox>
                                </td>
                                <td>
                                    <asp:TextBox class="cls" ID="txtCLS" runat="server" Width="50px" TabIndex="15" Style="text-align: right;"></asp:TextBox>
                                </td>--%>
                                    <td>
                                        <asp:TextBox class="cls" ID="txtRemark" runat="server" Width="50px" TabIndex="16"
                                            Style="text-align: right;"></asp:TextBox>
                                    </td>
                                    <!-- td>
                                <asp:TextBox class="cls" ID="txtImport" runat="server" Width="50px" TabIndex="6"
                                    Style="text-align: right;"></asp:TextBox></td -->
                                </tr>
                            </table>
                            <table class="paramlist admintable" width="100%">
                                <tr>
                                    <td colspan="2">
                                        <asp:Button class="button" ID="btnSave" runat="server" Text="Cập nhật" OnClick="btnSave_Click" />
                                    </td>
                                </tr>
                            </table>
                        </div>
                    </asp:Panel>
                    <%} %>
                    <div class="content-box-header">
                        <h3 style="cursor: s-resize;">TÌM LỊCH TÀU</h3>
                        <div style="float: right; margin: 7px;">
                            <%if (Session["SchedulePortToID"] != null && Session["SchedulePortFromID"] != null)
                              { %>
                            <a class="button" href="Prices.aspx?action=allschedules_exp&PortToID=<%Response.Write(Session["SchedulePortToID"].ToString());%>&PortFromID=<%Response.Write(Session["SchedulePortFromID"].ToString());%>"
                                target="_blank" style="display: inline;">All Rates (EXP)</a> &nbsp;<a class="button"
                                    href="Prices.aspx?action=allschedules_imp&PortToID=<%Response.Write(Session["SchedulePortFromID"].ToString());%>&PortFromID=<%Response.Write(Session["SchedulePortToID"].ToString());%>"
                                    target="_blank" style="display: inline;">All Rates (IMP)</a>
                            <%} %>
                            <input id="btnAddNew" type="button" class="button" value="Add new" />
                            <input type="button" class="button" value="Edit" id="btnsaveall" runat="server" />
                        </div>
                        <div class="clear">
                        </div>
                    </div>
                    <asp:Panel ID="Panel1" runat="server" DefaultButton="btnSearch">
                        <div id="divSearch">
                            <div style="height: auto; padding-top: 7px;">
                                <span style="background: #e5e5e5 url('/assets/images/bg-content-box.gif') top left repeat-x; padding: 12px; border-radius: 7px; margin-right: 20px;">
                                    <asp:ToolkitScriptManager ID="ScriptManager1" runat="server">
                                    </asp:ToolkitScriptManager>
                                    <%--Carr--%>
                                    <asp:TextBox ID="txtCarr" name="txtCarr" runat="server" Width="50px" PlaceHolder="Carr"></asp:TextBox>
                                    <asp:HiddenField ID="hidCarrID" runat="server" />
                                    <asp:AutoCompleteExtender ID="AutoCompleteExtender5" runat="server" ServiceMethod="CarrsAutoCompleteAjaxRequest"
                                        ServicePath="Webservices/AutoComplete.asmx" MinimumPrefixLength="2" CompletionInterval="100"
                                        EnableCaching="false" CompletionSetCount="10" TargetControlID="txtCarr" FirstRowSelected="true"
                                        CompletionListCssClass="completionList" CompletionListItemCssClass="listItem"
                                        CompletionListHighlightedItemCssClass="itemHighlighted" DelimiterCharacters=","
                                        OnClientItemSelected="OnCarrsSelected">
                                    </asp:AutoCompleteExtender>
                                    <%--Service Code--%>
                                    <asp:DropDownList class="cls" ID="ddServiceSeach" runat="server" Width="100px" TabIndex="17"
                                        OnSelectedIndexChanged="ddServiceSeach_SelectedIndexChanged" AutoPostBack="true">
                                        <asp:ListItem Text="Ser Code" Value=""></asp:ListItem>
                                    </asp:DropDownList>
                                    <%--POL--%>
                                    <asp:TextBox ID="txtPol" name="txtPol" runat="server" Width="120px" PlaceHolder="Pol"
                                        BackColor="AliceBlue" Font-Bold="true"></asp:TextBox>
                                    <asp:HiddenField ID="hidPolID" runat="server" />
                                    <asp:AutoCompleteExtender ID="AutoCompleteExtender2" runat="server" ServiceMethod="PortAutoCompleteAjaxRequest"
                                        ServicePath="Webservices/AutoComplete.asmx" MinimumPrefixLength="2" CompletionInterval="100"
                                        EnableCaching="false" CompletionSetCount="10" TargetControlID="txtPol" FirstRowSelected="true"
                                        CompletionListCssClass="completionList" CompletionListItemCssClass="listItem"
                                        CompletionListHighlightedItemCssClass="itemHighlighted" DelimiterCharacters=","
                                        OnClientItemSelected="OnPolSelected">
                                    </asp:AutoCompleteExtender>
                                    <%--From Country--%>
                                    <asp:TextBox class="cls" ID="txtCountryFromSearch" runat="server" Width="90px" PlaceHolder="Frm Country"></asp:TextBox>
                                    <asp:HiddenField ID="hidCountryFromSearch" runat="server"></asp:HiddenField>
                                    <asp:AutoCompleteExtender ID="AutoCompleteExtenderCountry" runat="server" ServiceMethod="CountryAutoCompleteAjaxRequest"
                                        ServicePath="Webservices/AutoComplete.asmx" MinimumPrefixLength="2" CompletionInterval="100"
                                        EnableCaching="false" CompletionSetCount="10" TargetControlID="txtCountryFromSearch"
                                        FirstRowSelected="true" CompletionListCssClass="completionList" CompletionListItemCssClass="listItem"
                                        CompletionListHighlightedItemCssClass="itemHighlighted" DelimiterCharacters=","
                                        OnClientItemSelected="OnCountryFromSelected">
                                    </asp:AutoCompleteExtender>
                                    <%--From Service Area--%>
                                    <asp:TextBox class="cls" ID="txtServiceAreaFromSearch" runat="server" Width="110px"
                                        PlaceHolder="Frm SerArea"></asp:TextBox>
                                    <asp:HiddenField ID="hidServiceAreaFromSearch" runat="server"></asp:HiddenField>
                                    <asp:AutoCompleteExtender ID="AutoCompleteServiceArea" runat="server" ServiceMethod="ServiceAreaAutoCompleteAjaxRequest"
                                        ServicePath="Webservices/AutoComplete.asmx" MinimumPrefixLength="2" CompletionInterval="100"
                                        EnableCaching="false" CompletionSetCount="10" TargetControlID="txtServiceAreaFromSearch"
                                        FirstRowSelected="true" CompletionListCssClass="completionList" CompletionListItemCssClass="listItem"
                                        CompletionListHighlightedItemCssClass="itemHighlighted" OnClientItemSelected="OnServiceAreaFromSelected">
                                    </asp:AutoCompleteExtender>
                                    <%--From Region--%>
                                    <asp:TextBox class="cls" ID="txtRegionFromSearch" runat="server" Width="110px"
                                        PlaceHolder="To Region"></asp:TextBox>
                                    <asp:HiddenField ID="hidRegionFromSearch" runat="server"></asp:HiddenField>
                                    <asp:AutoCompleteExtender ID="AutoCompleteExtender7" runat="server" ServiceMethod="RegionAutoCompleteAjaxRequest"
                                        ServicePath="Webservices/AutoComplete.asmx" MinimumPrefixLength="2" CompletionInterval="100"
                                        EnableCaching="false" CompletionSetCount="10" TargetControlID="txtRegionFromSearch"
                                        FirstRowSelected="true" CompletionListCssClass="completionList" CompletionListItemCssClass="listItem"
                                        CompletionListHighlightedItemCssClass="itemHighlighted" OnClientItemSelected="OnRegionFromSelected">
                                    </asp:AutoCompleteExtender>
                                    <!-- Search TO -->
                                    <%--POD--%>
                                    <asp:TextBox ID="txtPod" name="txtPod" runat="server" Width="120px" PlaceHolder="Pod"
                                        BackColor="AliceBlue" Font-Bold="true"></asp:TextBox>
                                    <asp:HiddenField ID="hidPodID" runat="server" />
                                    <asp:AutoCompleteExtender ID="AutoCompleteExtender3" runat="server" ServiceMethod="PortAutoCompleteAjaxRequest"
                                        ServicePath="Webservices/AutoComplete.asmx" MinimumPrefixLength="2" CompletionInterval="100"
                                        EnableCaching="false" CompletionSetCount="10" TargetControlID="txtPod" FirstRowSelected="true"
                                        CompletionListCssClass="completionList" CompletionListItemCssClass="listItem"
                                        CompletionListHighlightedItemCssClass="itemHighlighted" DelimiterCharacters=","
                                        OnClientItemSelected="OnPodSelected">
                                    </asp:AutoCompleteExtender>
                                    <%--To Country--%>
                                    <asp:TextBox class="cls" ID="txtCountryToSearch" runat="server" Width="90px" PlaceHolder="To Country"></asp:TextBox>
                                    <asp:HiddenField ID="hidCountryToSearch" runat="server"></asp:HiddenField>
                                    <asp:AutoCompleteExtender ID="AutoCompleteExtender1" runat="server" ServiceMethod="CountryAutoCompleteAjaxRequest"
                                        ServicePath="Webservices/AutoComplete.asmx" MinimumPrefixLength="2" CompletionInterval="100"
                                        EnableCaching="false" CompletionSetCount="10" TargetControlID="txtCountryToSearch"
                                        FirstRowSelected="true" CompletionListCssClass="completionList" CompletionListItemCssClass="listItem"
                                        CompletionListHighlightedItemCssClass="itemHighlighted" DelimiterCharacters=","
                                        OnClientItemSelected="OnCountryToSelected">
                                    </asp:AutoCompleteExtender>
                                    <%--To Service Area--%>
                                    <asp:TextBox class="cls" ID="txtServiceAreaToSearch" runat="server" Width="110px"
                                        PlaceHolder="To SerArea"></asp:TextBox>
                                    <asp:HiddenField ID="hidServiceAreaToSearch" runat="server"></asp:HiddenField>
                                    <asp:AutoCompleteExtender ID="AutoCompleteExtender4" runat="server" ServiceMethod="ServiceAreaAutoCompleteAjaxRequest"
                                        ServicePath="Webservices/AutoComplete.asmx" MinimumPrefixLength="2" CompletionInterval="100"
                                        EnableCaching="false" CompletionSetCount="10" TargetControlID="txtServiceAreaToSearch"
                                        FirstRowSelected="true" CompletionListCssClass="completionList" CompletionListItemCssClass="listItem"
                                        CompletionListHighlightedItemCssClass="itemHighlighted" OnClientItemSelected="OnServiceAreaToSelected">
                                    </asp:AutoCompleteExtender>
                                    <%--To Region--%>
                                    <asp:TextBox class="cls" ID="txtRegionToSearch" runat="server" Width="110px"
                                        PlaceHolder="To Region"></asp:TextBox>
                                    <asp:HiddenField ID="hidRegionToSearch" runat="server"></asp:HiddenField>
                                    <asp:AutoCompleteExtender ID="AutoCompleteExtender6" runat="server" ServiceMethod="RegionAutoCompleteAjaxRequest"
                                        ServicePath="Webservices/AutoComplete.asmx" MinimumPrefixLength="2" CompletionInterval="100"
                                        EnableCaching="false" CompletionSetCount="10" TargetControlID="txtRegionToSearch"
                                        FirstRowSelected="true" CompletionListCssClass="completionList" CompletionListItemCssClass="listItem"
                                        CompletionListHighlightedItemCssClass="itemHighlighted" OnClientItemSelected="OnRegionToSelected">
                                    </asp:AutoCompleteExtender>
                                    <%--Update Time--%>
                                    <asp:DropDownList ID="drScheduleUpdateTime" runat="server" AutoPostBack="true" OnSelectedIndexChanged="drScheduleUpdateTime_SelectedIndexChanged">
                                        <asp:ListItem Value="0" Text="Timing"></asp:ListItem>
                                        <asp:ListItem Value="5" Text="5 ngày"></asp:ListItem>
                                        <asp:ListItem Value="10" Text="10 ngày"></asp:ListItem>
                                        <asp:ListItem Value="20" Text="20 ngày"></asp:ListItem>
                                        <asp:ListItem Value="30" Text="30 ngày"></asp:ListItem>
                                        <asp:ListItem Value="60" Text="60 ngày"></asp:ListItem>
                                        <asp:ListItem Value="90" Text="90 ngày"></asp:ListItem>
                                    </asp:DropDownList>
                                    <asp:Button class="button" ID="btnSearch" runat="server" Text="Search"
                                        OnClick="btnSearch_Click" />
                                </span>
                            </div>
                            <div class="clear">
                            </div>
                            <div style="margin-top: 10px; margin-left: 5px;">
                                <asp:Label ID="lblError" CssClass="msg-error" runat="server" Style="foat: right;"></asp:Label><br />
                            </div>
                        </div>
                    </asp:Panel>
            </div>
            <%=strAlphaBet%>
            <fieldset>
                <asp:Repeater ID="rptData" runat="server">
                    <ItemTemplate>
                        <tr onmouseover="this.style.background='#dbf0c9'" onmouseout="this.style.background='#ffffff'"
                            scheduleid='<%#Eval("ID") %>'>
                            <td align="center">
                                <%# DataBinder.Eval(Container.DataItem, "Index")%>
                            </td>
                            <td <%# nPermissions >=7? "editable=\"true\"":""%> code="CarrID" completesource="carrs">
                                <%# DataBinder.Eval(Container.DataItem, "CarrID")%>
                            </td>
                            <td <%# nPermissions >=7? "editable=\"true\"":""%> completesource="ports" code="PortToID"
                                width="150px">
                                <%# DataBinder.Eval(Container.DataItem, "PortToID")%>
                            </td>
                            <td <%# nPermissions >=7? "editable=\"true\"":""%> completesource="ports" code="PortFromID"
                                width="150px">
                                <%# DataBinder.Eval(Container.DataItem, "PortFromID")%>
                            </td>
                            <td editable="true" code="Ser">
                                <%# DataBinder.Eval(Container.DataItem, "Ser")%>
                            </td>
                            <td editable="true" code="Mon">
                                <%# DataBinder.Eval(Container.DataItem, "Mon")%>
                            </td>
                            <td editable="true" code="Tue">
                                <%# DataBinder.Eval(Container.DataItem, "Tue")%>
                            </td>
                            <td editable="true" code="Web">
                                <%# DataBinder.Eval(Container.DataItem, "web")%>
                            </td>
                            <td editable="true" code="Thu">
                                <%# DataBinder.Eval(Container.DataItem, "Thu")%>
                            </td>
                            <td editable="true" code="Fri">
                                <%# DataBinder.Eval(Container.DataItem, "Fri")%>
                            </td>
                            <td editable="true" code="Sat">
                                <%# DataBinder.Eval(Container.DataItem, "Sat")%>
                            </td>
                            <td editable="true" code="Sun">
                                <%# DataBinder.Eval(Container.DataItem, "Sun")%>
                            </td>
                            <td editable="true" code="TS1">
                                <%# DataBinder.Eval(Container.DataItem, "TS1")%>
                            </td>
                            <td editable="true" code="TS2">
                                <%# DataBinder.Eval(Container.DataItem, "TS2")%>
                            </td>
                            <%-- <td editable="true" code="CY">
                                        <%# DataBinder.Eval(Container.DataItem, "CY")%>
                                    </td>
                                    <td editable="true" code="CLS">
                                        <%# DataBinder.Eval(Container.DataItem, "CLS")%>
                                    </td>--%>
                            <td editable="true" code="Remark">
                                <%# DataBinder.Eval(Container.DataItem, "Remark")%>
                            </td>
                            <%-- <td editable="false" code="Region">
                                <%# DataBinder.Eval(Container.DataItem, "Region")%>
                            </td>--%>
                            <td code="LastUpdate">
                                <%# DataBinder.Eval(Container.DataItem, "LastUpdate")%>
                            </td>
                            <!-- td>
                                        <%# DataBinder.Eval(Container.DataItem, "Import")%>
                                    </td -->
                            <%if ((Session["schedules"] != null) && (int.Parse(Session["schedules"].ToString()) >= 3))
                              {%>
                            <td class="changed" style="background-position: left center;">
                                <div style="padding-left: 20px;">
                                    <%# DataBinder.Eval(Container.DataItem, "Action")%>
                                </div>
                            </td>
                            <%} %>
                        </tr>
                    </ItemTemplate>
                    <HeaderTemplate>
                        <table cellspacing="0" cellpadding="0" width="100%" border="0" class="adminlist"
                            editcellcontent="true">
                            <thead>
                                <tr>
                                    <th align="center" rowspan="2">Index
                                    </th>
                                    <th align="center" rowspan="2">Carr
                                    </th>
                                    <th align="center" rowspan="2">POL
                                    </th>
                                    <th align="center" rowspan="2">POD
                                    </th>
                                    <th align="center" rowspan="2">SER
                                    </th>
                                    <th align="center" colspan="7">Carr run/ time (days)
                                    </th>
                                    <th align="center" colspan="2">Port
                                    </th>
                                    <%--<th align="center" rowspan="2">CY
                                            </th>
                                            <th align="center" rowspan="2">CLS
                                            </th>--%>
                                    <th align="center" rowspan="2">Remark
                                    </th>
                                    <%-- <th align="center" rowspan="2">Region
                                    </th>--%>
                                    <th align="center" rowspan="2">Last Update
                                    </th>
                                    <%if (nPermissions >= 3)
                                      {%>
                                    <th align="center" rowspan="2" width="75px">Action
                                    </th>
                                    <%} %>
                                </tr>
                                <tr style="background: #CCC;">
                                    <th align="center">Mon
                                    </th>
                                    <th align="center">Tue
                                    </th>
                                    <th>Web
                                    </th>
                                    <th align="center">thu
                                    </th>
                                    <th align="center">Fri
                                    </th>
                                    <th align="center">Sat
                                    </th>
                                    <th align="center">Sun
                                    </th>
                                    <th align="center">TS1
                                    </th>
                                    <th align="center">TS2
                                    </th>
                                    <!-- th align="center">
                                                Update</th-->
                                </tr>
                            </thead>
                    </HeaderTemplate>
                    <FooterTemplate>
                        </TABLE>
                    </FooterTemplate>
                </asp:Repeater>
            </fieldset>
            <div class="clear">
            </div>
            <div id="footer">
                <%=strPager%>
            </div>
            </form>
        </div>
    </div>
    </div>
</body>
</html>
